<div style="padding:10px; padding-bottom:0px;">
  <%= render(:partial => "header")%>
  
  <div class="section" id="tr8n_translator_translations_container">
    <div class="small_section_title">
      <div style="<%=tr8n_style_attribute_tag('float', 'right')%>;font-weight:normal;font-size:10px;color:grey;">
        <%=link_to(tra("view all"), {:controller => "/tr8n/phrases", :action => :view, :translation_key_id => @translation_key.id, :anchor => "translations"}, :target => "_top") %> | 
				<% 
           comments_count = @translation_key.comments.count
           link_title = (comments_count > 0) ? "view comments (#{comments_count})" : "add comments"
        %>
        <%=link_to(tra(link_title), {:controller => "/tr8n/phrases", :action => :view, :translation_key_id => @translation_key.id, :anchor => "comments"}, :target => "_top") %>
      </div>
      <strong><%=tra("Vote on Translations")%></strong>
    </div>
  
    <div id="tr8n_translator_votes_for_<%=@translation_key.id%>" class="votes_container">
      <%= render :partial => "/tr8n/common/translation_votes", :locals => {:translation_key => @translation_key, :translations => @translations, :section_key => @section_key} %>
    </div>
  
    <div style="padding-top:10px;font-size:11px">
      <%=tra("Don't like any of these?")%> 
      <%=link_to(tra('Translate it yourself.'), :action => :submit, :translation_key_id => @translation_key.id, :origin => params[:origin]) %>
    </div>
  </div>
</div>

<% if tr8n_current_translator.manager? %>
  <div id="tr8n_translator_footer_container">
    <div style="padding:10px;color:#ccc;">
      <%=tra("Lock this phrase if you believe that it has been translated enough.") %>
    </div>   

    <%= form_for(@translation, :as => :translation, :url => {:controller => "/tr8n/translations", :action => :submit}, :html => {:id => :tr8n_translator_form, :method => :post}) do |f| %>
      <%= hidden_field_tag(:origin, params[:origin]) %>
      <%= hidden_field_tag(:translation_key_id, @translation_key.id, :id => :tr8n_translator_translation_key_id) %>
      <%= hidden_field_tag(:lock, "true") %>
      <div id="tr8n_translator_buttons_container" class="buttons_container">
          <button type="submit" class="translator_btn translator_submit_btn" onClick="Tr8n.Translation.lock(); resizeFrame(); return false;">
              <% if @translation_key.locked? %>
                <span><%=tra("Unlock This Phrase")%></span>
              <% else %>
                <span><%=tra("Lock This Phrase")%></span>
              <% end %> 
          </button>
      </div>
    <% end %>
  </div>
<% end %>